home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / bbs / pb_122.zip / PB122SDK.DOC < prev    next >
Text File  |  1992-08-17  |  56KB  |  1,774 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.          ██████                 ██████                            ███
  22.           ██  ██                 ██  ██                            ██
  23.           ██  ██ ██ ███   ████   ██  ██  ████   ████   ██ ███      ██
  24.           █████   ███ ██ ██  ██  █████  ██  ██     ██   ███ ██  █████
  25.           ██      ██  ██ ██  ██  ██  ██ ██  ██  █████   ██  ██ ██  ██
  26.           ██      ██     ██  ██  ██  ██ ██  ██ ██  ██   ██     ██  ██
  27.          ████    ████     ████  ██████   ████   ██████ ████     ██████
  28.  
  29.  
  30.                       Software Developer's Kit Version 1.22
  31.  
  32.                                 August 17, 1992
  33.  
  34.  
  35.                    Copyright (c) 1991-1992 Philippe Leybaert
  36.                                All rights reserved
  37.  
  38.  
  39.  
  40.         ╒══════════════════════════════════════════════════════════════════╕
  41.         │░░░░░░ PROBOARD SOFTWARE DEVELOPMENT KIT VERSION 1.22 ░░░░░░░░░░░░│
  42.         ╘══════════════════════════════════════════════════════════════════╛
  43.  
  44.  
  45.          Included with ProBoard is a C library that allows you to write
  46.          your own extensions to ProBoard in C or C++. All you need is an
  47.          ANSI-compatible C or C++ compiler. The programs you create can be
  48.          run within ProBoard by executing a new menu function.
  49.  
  50.          The ProBoard SDK files included with ProBoard are free software,
  51.          so anyone who does not use ProBoard to run a BBS on a regular
  52.          basis, but wants to write extension files, is allowed to do so
  53.          without registering ProBoard. You can distribute any ProBoard
  54.          extension files (PEX files) royalty-free. As far as we are
  55.          concerned, any program you develop with the ProBoard SDK is your
  56.          property.
  57.  
  58.  
  59.  
  60.         ┌──────────────────────────────────────────────────────────────────┐
  61.         │ Requirements                                                     │
  62.         └──────────────────────────────────────────────────────────────────┘
  63.  
  64.          To create your own programs you need:
  65.  
  66.          - An ANSI compatible C or C++ compiler. Compilers known to be
  67.            compatible with the ProBoard SDK are:
  68.  
  69.               - Zortech C/C++ 2.0 - 3.0
  70.               - Microsoft C 5.1 - 6.0
  71.               - Borland C++ 2.0 - 3.1
  72.               - Turbo C++ 1.0
  73.               - Turbo C 1.0 - 2.0
  74.  
  75.            Other compilers may work too, but were not tested.
  76.  
  77.          - An MS-compatible linker (usually the one that came with your
  78.            compiler).
  79.  
  80.            Linkers known to work with the ProBoard SDK are:
  81.  
  82.               - All Microsoft Linkers (LINK.EXE)
  83.               - Borland's Turbo Link (TLINK)
  84.               - Zortech's BLINK
  85.  
  86.          - The ProBoard SDK include file PB_SDK.H
  87.  
  88.          - The ProBoard SDK library PB_SDK.LIB
  89.  
  90.  
  91.  
  92.                                       - 1 -
  93.  
  94.  
  95.  
  96.         ┌──────────────────────────────────────────────────────────────────┐
  97.         │ Creating ProBoard Executables (PEX-files)                        │
  98.         └──────────────────────────────────────────────────────────────────┘
  99.  
  100.          To create your own ProBoard executable (.PEX file), you first
  101.          create a source file, say MYPROG.C. When ProBoard loads a PEX
  102.          file, it executes the function main() in your program. This
  103.          function is defined as:
  104.  
  105.          void
  106.          main(int argc,char *argv[])
  107.          {
  108.           ...
  109.          }
  110.  
  111.          The parameters 'argc' & 'argv' contain optional data that can be
  112.          given to your program at load time (exactly like C's argc and argv
  113.          parameters).  Creating this main() function is the only thing you
  114.          need to do to write a valid ProBoard executable. From this point
  115.          on, it's just like writing a regular C program.  Most of the ANSI
  116.          standard library functions are available, plus many ProBoard-
  117.          specific functions and global variables, used for interfacing
  118.          between your program and the ProBoard environment.  As in a regular
  119.          executable, you can build your program from several source files.
  120.  
  121.          This is a tiny sample ProBoard program:
  122.  
  123.          #include "pb_sdk.h"
  124.  
  125.          void
  126.          main()
  127.          {
  128.           printf("You have %d minutes left.\n",TimeLeft());
  129.  
  130.           AddTime(10);
  131.  
  132.           printf("Now you have %d minutes left.\n",TimeLeft());
  133.          }
  134.  
  135.  
  136.          Included with ProBoard are a few example programs (in source form
  137.          of course).
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.                                       - 2 -
  149.  
  150.  
  151.  
  152.         ┌──────────────────────────────────────────────────────────────────┐
  153.         │ Compiling and Linking                                            │
  154.         └──────────────────────────────────────────────────────────────────┘
  155.  
  156.          ProBoard executables have to be compiled using the LARGE memory
  157.          model.
  158.  
  159.          For example (Turbo C++) : tcc -c -ml myprog.c
  160.  
  161.          Once you have your .OBJ file (in this case MYPROG.OBJ), you have
  162.          to link it with the ProBoard SDK library (PB_SDK.LIB). You have to
  163.          specify a filename as output filename. The linked executable must
  164.          have extension .PEX. It is important to disable linking of the
  165.          default compiler libraries!! It is also required to turn on
  166.          case sensitivity.
  167.  
  168.          e.g.   Turbo C++ :  TLINK MYPROG,MYPROG.PEX,,PB_SDK /N /C
  169.                 Microsoft :  LINK MYPROG,MYPROG.PEX,,PB_SDK /NOD /NOI;
  170.                 Zortech   :  BLINK MYPROG,MYPROG.PEX,,PB_SDK /NOD /NOI;
  171.  
  172.          That's all there is to it. Now you can run your program through
  173.          ProBoard's menu function 60.
  174.  
  175.          I will now give the compiler syntax for some popular compilers:
  176.  
  177.           Zortech C/C++ : ztc -c -a -ml myprog.c
  178.           Microsoft C   : cl -Zep -Gs -c -AL myprog.c
  179.           Turbo C/C++   : tcc -c -ml myprog.c
  180.           Borland C++   : bcc -c -ml myprog.c
  181.  
  182.          And linker syntax:
  183.  
  184.           Borland       : TLINK MYPROG,MYPROG.PEX,,PB_SDK /N /C
  185.           Microsoft     : LINK MYPROG,MYPROG.PEX,,PB_SDK /NOD /NOI;
  186.           Zortech       : BLINK MYPROG,MYPROG.PEX,,PB_SDK /NOD /NOI;
  187.  
  188.  
  189.  
  190.         ┌──────────────────────────────────────────────────────────────────┐
  191.         │ Restrictions                                                     │
  192.         └──────────────────────────────────────────────────────────────────┘
  193.  
  194.          There are few restrictions in writing ProBoard executables. For C
  195.          programs there are actually only two major restriction: long math
  196.          & floating point operations.
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.                                       - 3 -
  205.  
  206.  
  207.  
  208.          Due to the fact that all compilers generate function calls to
  209.          multiply, divide and shift long integers, and that every compiler
  210.          vendor uses its own array of functions, it is impossible to
  211.          include these functions in the ProBoard SDK. As a result, it is
  212.          not directly possible to perform these operations on long values
  213.          (eg. long1 = long2 * long3). However, we did include functions to
  214.          perform these operations, but you will have to call these
  215.          functions explicitly (eg. long1 = l_mul(long2,long3)).  People who
  216.          know their compiler well, can work around this problem by
  217.          extracting the long math functions from the standard library, and
  218.          linking them with the PEX file. For example, the long math
  219.          functions used by the Zortech compiler are in the module
  220.          LMATH.OBJ, located in the library ZLC.LIB. Extracting this module
  221.          is as simple as :  ZORLIB ZLS *LMATH;
  222.  
  223.          These are the ProBoard long math functions that you can use:
  224.  
  225.          long l_mul(long1,long2)   Multiply 2 long values   = long1 * long2
  226.          long l_div(long1,long2)   Divide 2 long values     = long1 / long2
  227.          long l_mod(long1,long2)   Modulo of 2 long values  = long1 % long2
  228.          long l_shl(long1,int1)    Left shift a long value  = long1 << int1
  229.          long l_shr(long1,int1)    Right shift a long value = long1 >> int1
  230.  
  231.          The functions l_div(), l_mod(), l_shl() and l_shr() are also
  232.          available for unsigned long values: ul_div(), ul_mod(), ul_shl()
  233.          and ul_shr().
  234.  
  235.          Floating point operations are NOT supported. So it is not possible
  236.          to use 'double' and 'float' variables & constants.
  237.  
  238.          Another major restriction only affects C++ programs. In a ProBoard
  239.          C++ program, you can't declare global variables that have
  240.          constructors or destructors (ie. no static constructors &
  241.          destructors). So this will compile fine, but will certainly crash
  242.          your machine:
  243.  
  244.          class myclass
  245.            {
  246.             int a;
  247.           public:
  248.             x() { .... some action .... }
  249.            ~x() { .... some action .... }
  250.            };
  251.  
  252.          myclass some_global_object;
  253.  
  254.          main()
  255.          {
  256.           ...
  257.          }
  258.  
  259.  
  260.                                       - 4 -
  261.  
  262.  
  263.  
  264.          You can, however, use objects with constructors and destructors,
  265.          as long as they are declared within a function. So this would
  266.          work:
  267.  
  268.          main()
  269.          {
  270.           myclass some_local_object;
  271.           ....
  272.          }
  273.  
  274.  
  275.  
  276.         ┌──────────────────────────────────────────────────────────────────┐
  277.         │ Library functions supported                                      │
  278.         └──────────────────────────────────────────────────────────────────┘
  279.  
  280.          Almost all standard library functions are supported. Note that all
  281.          functions that write to the standard output device (printf,
  282.          putchar,...) write their output to the ProBoard window and to the
  283.          user (through the modem).  Functions that read from the standard
  284.          input device and from the keyboard are NOT supported.
  285.          (scanf,getch,gets,...) We provide substitutes for these functions.
  286.  
  287.          Functions supported:
  288.  
  289.               fopen , freopen , fseek , ftell , fgets , fgetc , fflush
  290.               fclose , fputs , getc , getchar , gets , fputc , putc ,
  291.               putchar , puts , fread , fwrite , printf , fprintf ,
  292.               vfprintf , vprintf , sprintf , vsprintf , setbuf ,
  293.               setvbuf , remove , rename , rewind , clearerr , feof ,
  294.               isalpha , iscntrl , isdigit , isgraph , islower ,
  295.               isprint , ispunct , isspace , isupper , isxdigit ,
  296.               toupper , tolower , int86x , intdos , intdosx ,
  297.               dos_findfirst , dos_findnext , write , open , creat ,
  298.               close , unlink , chsize , dup , dup2 , lseek , access ,
  299.               filesize , filelength , isatty , atoi , atol , strtol ,
  300.               rand , srand , calloc , free , malloc , realloc , putenv
  301.               getenv , abs , labs , memcpy , memmove , strcpy , strncpy ,
  302.               strcat , strncat , memcmp , strcmp , strncmp , memchr ,
  303.               strchr , strcspn , strpbrk , strrchr , strspn , strstr ,
  304.               strtok , memset , strlen , memicmp , stpcpy , strcmpl ,
  305.               strnicmp , strdup , strlwr , strupr , strnset , strrev ,
  306.               strset , swab , strncmpl , strnicmp , clock , time , mktime ,
  307.               asctime , ctime , localtime , gmtime , strftime , sleep ,
  308.               usleep , msleep , difftime
  309.  
  310.  
  311.          For information on these functions, consult your compiler's
  312.          library reference manual.
  313.  
  314.  
  315.  
  316.                                       - 5 -
  317.  
  318.  
  319.  
  320.          In the string output functions (printf and puts), you can use the
  321.          following control codes in your string:
  322.  
  323.          \001 or \x01   Set output color to red
  324.          ::::    ::::
  325.          ::::    ::::
  326.          \007 or \x07   Set output color to white
  327.  
  328.          \x11 to \x17   Same as \1 to \7, but blinking colors
  329.  
  330.          \t             Stops output of string until user presses [Enter]
  331.          \f             Clears the user's screen (if enabled in the user's
  332.                         record)
  333.  
  334.  
  335.          NOTE: Do NOT include any standard include files from your
  336.          compiler. The only include file you can use is PB_SDK.H.
  337.          THAT'S IT!!
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.                                       - 6 -
  373.  
  374.  
  375.  
  376.         ┌──────────────────────────────────────────────────────────────────┐
  377.         │ ProBoard Interface Functions                                     │
  378.         └──────────────────────────────────────────────────────────────────┘
  379.  
  380.          This is a list of all the functions that can be used to interface
  381.          with ProBoard.
  382.  
  383.          Several types have been defined in the file PB_SDK.H
  384.  
  385.            bool    : a boolean value that can have the values TRUE or FALSE
  386.            byte    : an unsigned character (8 bits)
  387.            KEY     : used for key scan codes (for sysopkey handlers and the
  388.                      ScanKey() function).
  389.  
  390.  
  391.          ------------------------------------------------------------------
  392.          void AddTime(int min);
  393.          ------------------------------------------------------------------
  394.  
  395.          Adds 'min' minutes to the user's time left. If 'min' is negative, the
  396.          number of minutes will be subtracted from the time left.
  397.  
  398.          Examples:    AddTime(10);         /* Adds 10 minutes */
  399.                       AddTime(-5);         /* Subtracts 5 minutes */
  400.  
  401.  
  402.  
  403.          ------------------------------------------------------------------
  404.          int TimeLeft(void);
  405.          ------------------------------------------------------------------
  406.  
  407.          Returns the time left in minutes for the current user.
  408.  
  409.  
  410.  
  411.          ------------------------------------------------------------------
  412.          int TimeOnline(void);
  413.          ------------------------------------------------------------------
  414.  
  415.          Returns the time in minutes that the current user is online.
  416.  
  417.  
  418.  
  419.          ------------------------------------------------------------------
  420.          void SuspendTimer(void);
  421.          ------------------------------------------------------------------
  422.  
  423.          Suspends the online-timer for the current user. No time will be
  424.          subtracted until RestartTimer() is called.
  425.  
  426.  
  427.  
  428.                                       - 7 -
  429.  
  430.  
  431.  
  432.          ------------------------------------------------------------------
  433.          void RestartTimer(void);
  434.          ------------------------------------------------------------------
  435.  
  436.          Restarts the timer after a call to SuspendTimer().
  437.  
  438.  
  439.  
  440.          ------------------------------------------------------------------
  441.          void AdjustTime(void);
  442.          ------------------------------------------------------------------
  443.  
  444.          Call this function if you changed the user's level. This
  445.          recalculates all limits (time,download,...).
  446.  
  447.  
  448.  
  449.          ------------------------------------------------------------------
  450.          void MsgEd(void);
  451.          ------------------------------------------------------------------
  452.  
  453.          Fires up the internal message editor or the fullscreen editor,
  454.          depending on the settings of the user. The message will be stored
  455.          in the file MSGTMP in the current directory. If a message is
  456.          aborted, the file MSGTMP will be deleted by the message editor.
  457.          If you create a MSGTMP file before invoking the message editor,
  458.          this file will be used as a 'quote' message.
  459.  
  460.  
  461.  
  462.          ------------------------------------------------------------------
  463.          int PostMessage(char *from,char *to,char *subject,int area,
  464.                          bool pvt);
  465.          ------------------------------------------------------------------
  466.  
  467.          Posts a message to a user.
  468.  
  469.             from    = Name of the sender
  470.             to      = Name of the user you're sending the message to
  471.             subject = Subject of the message
  472.             area    = Message area number where the message has to
  473.                       be posted in.
  474.             pvt     = Private status (TRUE=private, FALSE=public)
  475.  
  476.          No checking is performed on any of the parameters!
  477.  
  478.  
  479.          Return value: -1 on error
  480.                         0 if ok
  481.  
  482.  
  483.  
  484.                                       - 8 -
  485.  
  486.  
  487.  
  488.          ------------------------------------------------------------------
  489.          int PostNetmail(char *from,char *to,char *subject,int area,
  490.                          FIDO_NODE *address,bool attach,bool crash,
  491.                          bool kill);
  492.          ------------------------------------------------------------------
  493.  
  494.          Posts a netmail message.
  495.  
  496.             from    = Name of the sender
  497.             to      = Name of the user you're sending the message to
  498.             subject = Subject of the message
  499.             area    = Message area number where the message has to
  500.                       be posted in
  501.             address = Destination node number of this message.
  502.             attach  = TRUE for a file attach message
  503.             crash   = TRUE if this message is a crashmail message
  504.             kill    = TRUE if the message has to be deleted after it is
  505.                       sent
  506.  
  507.  
  508.          FIDO_NODE is a structure with the following fields:
  509.  
  510.            struct
  511.              {
  512.               unsigned zone;  /* Zone number  */
  513.               unsigned net;   /* Net number   */
  514.               unsigned node;  /* Node number  */
  515.               unsigned point; /* Point number */
  516.              }
  517.  
  518.          No checking is performed on any of the parameters!
  519.  
  520.          Return value: -1 on error
  521.                         0 if ok
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.                                       - 9 -
  541.  
  542.  
  543.  
  544.          ------------------------------------------------------------------
  545.          int ReadMsgArea(int area,MSGAREA *ma);
  546.          ------------------------------------------------------------------
  547.  
  548.          Reads data about a message area.
  549.  
  550.               area  = Message area number (1-200)
  551.               ma    = Pointer to a MSGAREA structure to be filled
  552.  
  553.          Check the file PB_SDK.H for details about the MSGAREA structure
  554.          definition.
  555.  
  556.          Return value: -1 if not defined
  557.                         0 if read ok
  558.  
  559.  
  560.  
  561.          ------------------------------------------------------------------
  562.          int ReadMessage(MESSAGE *msg,int msgnum);
  563.          ------------------------------------------------------------------
  564.  
  565.          Reads message number <msgnum> into the MESSAGE structure. To
  566.          access the text of the message, use the function
  567.          CreateMessageText().
  568.          See the file PB_SDK.H for a description of the MESSAGE structure.
  569.  
  570.          Return value: -1 if the message does not exists
  571.                         0 if the message is read ok
  572.  
  573.  
  574.  
  575.          ------------------------------------------------------------------
  576.          void WriteMSGTMP(char *text);
  577.          ------------------------------------------------------------------
  578.  
  579.          Writes the string <text> to the file MSGTMP. The file is always
  580.          recreated when using this function. To append text to MSGTMP,
  581.          use the function AppendMSGTMP(). You have to insert your own CR/LF
  582.          pairs in the text if you want to force a newline.  Lines can be
  583.          longer than 80 characters.  The message processing functions will
  584.          do a word-wrap if necessary.  Do NOT insert a single CR or LF in
  585.          the text. (\r or \n).
  586.  
  587.  
  588.  
  589.          ------------------------------------------------------------------
  590.          void AppendMSGTMP(char *text);
  591.          ------------------------------------------------------------------
  592.  
  593.          Same as WriteMSGTMP(), but adds text to an EXISTING file.
  594.  
  595.  
  596.                                       - 10 -
  597.  
  598.  
  599.  
  600.          ------------------------------------------------------------------
  601.          void ShowMessage(MESSAGE *msg);
  602.          ------------------------------------------------------------------
  603.  
  604.          Shows the message <msg> to the user, including header and message
  605.          text.
  606.          See the file PB_SDK.H for an description of the MESSAGE structure.
  607.  
  608.  
  609.  
  610.          ------------------------------------------------------------------
  611.          void CreateMessageText(MESSAGE *msg);
  612.          ------------------------------------------------------------------
  613.  
  614.          Reads the text that belongs to message <msg>, and stores it in a
  615.          file called MSGTMP in the current directory. This file can then be
  616.          accessed as an ordinary textfile.
  617.  
  618.  
  619.  
  620.          ------------------------------------------------------------------
  621.          void CreateMessageTextString(MESSAGE *msg,char *text,int max);
  622.          ------------------------------------------------------------------
  623.  
  624.          Reads the text that belongs to message <msg>, and stores it in the
  625.          string <text>. The text will be terminated by a '\0' character.
  626.          You have to specify a maximum number of characters that can be
  627.          stored in <text>.
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.                                       - 11 -
  653.  
  654.  
  655.  
  656.          ------------------------------------------------------------------
  657.          int FirstMessage(MESSAGE *msg,int area,int order,int first);
  658.          int NextMessage(MESSAGE *msg,int area,int order);
  659.          ------------------------------------------------------------------
  660.  
  661.          These functions are used to read messages in forward or reverse
  662.          order. To start scanning messages, you have to call the
  663.          FirstMessage() function first, and the NextMessage() function to
  664.          read more messages.
  665.  
  666.          msg   = MESSAGE structure where the message has to be stored.
  667.          area  = area number to read messages in (0 = all areas)
  668.          order = 1 for forward order, -1 for reverse order
  669.          first = message to start reading from. This message does NOT
  670.                  need to exist. The first non-deleted message following
  671.                  this message will be read first.
  672.  
  673.          See the file PB_SDK.H for an description of the MESSAGE structure.
  674.  
  675.          Return value: -1  No more messages found.
  676.                        >0  Message number of message found.
  677.  
  678.  
  679.          This is an example on how to use these functions:
  680.  
  681.          result = FirstMessage(msg,0,+1,1);
  682.          while(result >= 0)
  683.            {
  684.             /* Do something with the message */
  685.             result = NextMessage(msg,0,+1);
  686.            }
  687.  
  688.  
  689.  
  690.          ------------------------------------------------------------------
  691.          void DeleteMessage(MESSAGE *msg);
  692.          ------------------------------------------------------------------
  693.  
  694.          Deletes message <msg>.
  695.  
  696.  
  697.  
  698.          ------------------------------------------------------------------
  699.          void MarkMessage(int msgnum);
  700.          ------------------------------------------------------------------
  701.  
  702.          Marks message number <msgnum> for later retrieval. Up to 200
  703.          messages can be marked.
  704.  
  705.  
  706.  
  707.  
  708.                                       - 12 -
  709.  
  710.  
  711.  
  712.          ------------------------------------------------------------------
  713.          void ReadMarkedMessages(void);
  714.          ------------------------------------------------------------------
  715.  
  716.          Shows all marked messages to the user, with the option to wait
  717.          after each message. If the user selected to wait after each
  718.          message, the standard message options menu will be shown to the
  719.          user. (Next,Prev,Stop,...).
  720.          In fact, this function is identical to menu function "Read
  721.          Messages", with the user selecting "Marked".
  722.  
  723.  
  724.  
  725.          ------------------------------------------------------------------
  726.          void ListMarkedMessages(void);
  727.          ------------------------------------------------------------------
  728.  
  729.          Is similar to ReadMarkedMessages(), but this function acts as a
  730.          "QuickScan Messages" with the user selecting "Marked".
  731.  
  732.  
  733.  
  734.          ------------------------------------------------------------------
  735.          void UnMarkAllMessages(void);
  736.          ------------------------------------------------------------------
  737.  
  738.          Unmarks all messages that were previously marked. You have to call
  739.          this function before marking any messages, because the list of
  740.          marked messages is remembered until a user logs off.
  741.  
  742.  
  743.  
  744.          ------------------------------------------------------------------
  745.          int FuzzySearch(char *text,char *string,int degree);
  746.          ------------------------------------------------------------------
  747.  
  748.          Performs a fuzzy search for <string> in <text>. <degree> is the
  749.          percentage of the characters in <string> that have to match.
  750.  
  751.          Return value: -1 if not found
  752.                        >0 percentage of characters matched
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.                                       - 13 -
  765.  
  766.  
  767.  
  768.          ------------------------------------------------------------------
  769.          IO_... functions
  770.          ------------------------------------------------------------------
  771.  
  772.          All functions starting with IO_ are low-level functions to access
  773.          the serial port directly. Do NOT use these functions for ordinary
  774.          I/O operations. They are intended for writing file transfer
  775.          protocols. See the file PB_SDK.H for a description of these
  776.          functions.
  777.  
  778.  
  779.  
  780.          ------------------------------------------------------------------
  781.          char WaitKey(void);
  782.          ------------------------------------------------------------------
  783.  
  784.          Waits for a character to be read from the modem or local keyboard.
  785.  
  786.          Return value: the character read.
  787.  
  788.  
  789.  
  790.          ------------------------------------------------------------------
  791.          char WaitKeys(char *keylist);
  792.          ------------------------------------------------------------------
  793.  
  794.          Waits for any character specified in <keylist>.
  795.  
  796.          Return value: the key from the list that was pressed (converted to
  797.                        uppercase if the key is a letter).
  798.  
  799.          Example : c = WaitKeys("ABC\r\x1b");
  800.                    /* Waits for A,B,C,<Enter> or <Esc> */
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.                                       - 14 -
  821.  
  822.  
  823.  
  824.          ------------------------------------------------------------------
  825.          void Input(char *buf,int len,int readmode);
  826.          ------------------------------------------------------------------
  827.  
  828.          Asks for a string from the user. The string is stored in <buf>,
  829.          and the user will not be allowed to enter more than <len>
  830.          characters.
  831.  
  832.          <readmode> :  INPUT_ALL      : All characters are allowed
  833.                        INPUT_UPFIRST  : First character of each word is
  834.                                         converted to uppercase.
  835.                        INPUT_UPALL    : All characters are converted to
  836.                                         uppercase.
  837.                        INPUT_DIGITS   : Only digits are accepted.
  838.  
  839.                        INPUT_NOFIELD  : OR together with any of the
  840.                                         previous modes if you don't want an
  841.                                         input-field background to be
  842.                                         displayed.
  843.  
  844.  
  845.  
  846.          ------------------------------------------------------------------
  847.          bool Ask(bool default);
  848.          ------------------------------------------------------------------
  849.  
  850.          Asks for a Yes or No response from the user. Pressing 'Y' returns
  851.          TRUE and outputs "Yes". Pressing 'N' returns FALSE and sends "No"
  852.          to the user. Pressing <Enter> returns <default>, and sends "Yes"
  853.          or "No", depending on <default>.
  854.  
  855.  
  856.  
  857.          ------------------------------------------------------------------
  858.          char PeekChar(void);
  859.          ------------------------------------------------------------------
  860.  
  861.          Checks if a character is available in the input buffer, and
  862.          returns that character if there is.
  863.  
  864.          Return value:     0 if no character available
  865.                         != 0 the character read (key pressed by user)
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.                                       - 15 -
  877.  
  878.  
  879.  
  880.          ------------------------------------------------------------------
  881.          void SetColor(char color);
  882.          ------------------------------------------------------------------
  883.  
  884.          Changes the current output color. All text that is output after
  885.          this function is called will be displayed in the specified color.
  886.          This function does nothing when the user does not have ANSI or
  887.          AVATAR enabled.
  888.  
  889.          <color> can be one of the following:
  890.  
  891.             BLACK , RED , GREEN , YELLOW , MAGENTA , BLUE , CYAN , WHITE
  892.  
  893.  
  894.  
  895.          ------------------------------------------------------------------
  896.          void SetfullColor(unsigned char color);
  897.          ------------------------------------------------------------------
  898.  
  899.          Changes the current foreground & background color. The color code
  900.          is an IBM-type screen color code. This function does nothing when
  901.          the user does not have ANSI or AVATAR enabled.
  902.  
  903.          Some examples:
  904.  
  905.              0x1E : Bright yellow on dark blue background.
  906.              0x87 : Blinking white on a black background.
  907.  
  908.  
  909.  
  910.          ------------------------------------------------------------------
  911.          void GotoXY(int x,int y);
  912.          ------------------------------------------------------------------
  913.  
  914.          Moves the cursor to position (x,y). The upper left corner of the
  915.          screen is (1,1). This function does nothing when the user does
  916.          not have ANSI or AVATAR enabled.
  917.  
  918.  
  919.  
  920.          ------------------------------------------------------------------
  921.          void ClrEol();
  922.          ------------------------------------------------------------------
  923.  
  924.          Clears from the current cursor position to the end of the
  925.          line. This function does nothing when the user does not have ANSI
  926.          or AVATAR enabled.
  927.  
  928.  
  929.  
  930.  
  931.  
  932.                                       - 16 -
  933.  
  934.  
  935.  
  936.          ------------------------------------------------------------------
  937.          void EnableStop(void);
  938.          void DisableStop(void);
  939.          bool Stopped(void);
  940.          ------------------------------------------------------------------
  941.  
  942.          Enables stopping of output by pressing 'S'. When enabled, a user
  943.          can press 'S' to stop incoming text. When this happens, any
  944.          string output function will immediately return to the caller, en
  945.          the function Stopped() will return TRUE to indicate that the user
  946.          requested to stop output.
  947.  
  948.          EnableStop()       Enables this feature and sets the "stopped"
  949.                             status to FALSE .
  950.          DisableStop()      Disables the stop feature.
  951.          Stopped()          Returns the "stopped" flag (TRUE or FALSE).
  952.  
  953.  
  954.          Example:
  955.  
  956.               EnableStop();
  957.               for(i=0;i<100;i++)
  958.                 {
  959.                  printf("...something...");
  960.                  if(Stopped()) break;
  961.                 }
  962.  
  963.  
  964.  
  965.          ------------------------------------------------------------------
  966.          char ShowHotkeyFile(char *filename,char *hotkeys);
  967.          ------------------------------------------------------------------
  968.  
  969.          Shows the file <filename> to the user, and watches for incoming
  970.          keys that are specified in <hotkeys>. If one of these keys is
  971.          detected, the function stops output, and returns the hotkey. The
  972.          "stop" feature will be enabled when sending the file.
  973.  
  974.          Return value:    0 : File sent completely and no hotkeys pressed.
  975.                           1 : 'S' pressed (output stopped)
  976.                           2 : File not found
  977.                         !=2 : Hotkey detected
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.                                       - 17 -
  989.  
  990.  
  991.  
  992.          ------------------------------------------------------------------
  993.          char ShowHotkeyANSIFile(char *filename,char *hotkeys);
  994.          ------------------------------------------------------------------
  995.  
  996.          This function is identical to ShowKotkeyFile(), except for the
  997.          fact that no extension and path can be specified. Depending on the
  998.          setting of the user, <filename>.ANS/ASC in the textfiles
  999.          directory will be sent. If no .ANS file is found, it will try to
  1000.          send the .ASC file. If that fails too, 2 will be returned.
  1001.  
  1002.          Return value:    0 : File sent completely and no hotkeys pressed.
  1003.                           1 : 'S' pressed (output stopped)
  1004.                           2 : File not found
  1005.                         !=2 : Hotkey detected
  1006.  
  1007.  
  1008.  
  1009.          ------------------------------------------------------------------
  1010.          void InitLineCounter(void);
  1011.          bool LineCounter(void);
  1012.          ------------------------------------------------------------------
  1013.  
  1014.          These functions are used to support page pausing ("More Y/N").
  1015.          Calling InitLineCounter() initializes the line counter to 0.
  1016.          Every time you call LineCounter(), the line counter is incremented
  1017.          by one. If the counter reaches the screen length, the user will be
  1018.          asked if he wants to continue reading. If he selects "No", the
  1019.          LineCounter() function will return FALSE.
  1020.  
  1021.          Example:
  1022.  
  1023.              InitLineCounter();
  1024.              for(;;)
  1025.                {
  1026.                 printf("...something...\n");
  1027.                 if(!LineCounter()) break;
  1028.                }
  1029.  
  1030.  
  1031.  
  1032.          ------------------------------------------------------------------
  1033.          bool ExternalInput(void);
  1034.          ------------------------------------------------------------------
  1035.  
  1036.          Returns TRUE when the last character that was read through any of
  1037.          the input routings originated from the remote keyboard (ie. the
  1038.          sysop did not type it).
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.                                       - 18 -
  1045.  
  1046.  
  1047.  
  1048.          ------------------------------------------------------------------
  1049.          int ReadUser(USER_REC *rec,int recnr);
  1050.          ------------------------------------------------------------------
  1051.  
  1052.          Reads user record number <recnr> (0-...) from the user file and
  1053.          stores it in <rec>.
  1054.  
  1055.          Return value:  -1 if record does not exist.
  1056.                          0 if record is read ok.
  1057.  
  1058.  
  1059.  
  1060.          ------------------------------------------------------------------
  1061.          void WriteUser(USER_REC *rec,int recnr);
  1062.          ------------------------------------------------------------------
  1063.  
  1064.          Writes user record <rec> to record number <recnr> in the userfile.
  1065.  
  1066.  
  1067.  
  1068.          ------------------------------------------------------------------
  1069.          char PlayMusic(char *filename,char *hotkeys);
  1070.          ------------------------------------------------------------------
  1071.  
  1072.          Plays a .MUS file. The file has to be located in the ProBoard
  1073.          system directory. Do not include a path and extension in
  1074.          <filename>. The music can be stopped if the sysop presses one of
  1075.          the keys specified in <hotkeys>.            ^^^^^
  1076.  
  1077.          Return value:   0   Music file played till the end
  1078.                          1   Music file not found
  1079.                          >1  The hotkey pressed by the SYSOP
  1080.                                                        ^^^^^
  1081.  
  1082.  
  1083.          ------------------------------------------------------------------
  1084.          void PostInfo(char *filename);
  1085.          ------------------------------------------------------------------
  1086.  
  1087.          Does exactly the same as the POSTINFO statement in a .Q-A file.
  1088.          No path and extension is allowed in <filename>. The file where
  1089.          the information will be written to will have the extension .ASW
  1090.          and will be placed in the ProBoard system directory.
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.                                       - 19 -
  1101.  
  1102.  
  1103.  
  1104.          ------------------------------------------------------------------
  1105.          int ReadFileArea(int areanum,FILEAREA *fa);
  1106.          ------------------------------------------------------------------
  1107.  
  1108.          Reads information about file area number <areanum> in the <fa>
  1109.          structure.
  1110.          Check the file PB_SDK.H for details about the FILEAREA structure.
  1111.  
  1112.          Return value:   -1   File area does not exist
  1113.                           0   Ok
  1114.  
  1115.  
  1116.  
  1117.          ------------------------------------------------------------------
  1118.          void MenuFunction(int function,char *data);
  1119.          ------------------------------------------------------------------
  1120.  
  1121.          Executes menu function <function> with <data>. For details, see
  1122.          the menu functions description in this file.
  1123.          There are named constants declared for each function in the file
  1124.          PB_SDK.H. It is recommended that you use these constants instead
  1125.          of numbers.
  1126.  
  1127.  
  1128.  
  1129.          ------------------------------------------------------------------
  1130.          void Log(int loglevel,char *fmt,...);
  1131.          ------------------------------------------------------------------
  1132.  
  1133.          With this function you can write information to the ProBoard
  1134.          logfile. The log entry will be written if the user has a loglevel
  1135.          that is greater than <loglevel> .
  1136.  
  1137.          <loglevel> can be one of the following:
  1138.  
  1139.              LOG_FRIEND , LOG_NORMAL , LOG_SUSPICIOUS , LOG_DANGEROUS
  1140.  
  1141.          If you want a log entry to be written regardless of the user's
  1142.          loglevel, use LOG_FRIEND.
  1143.  
  1144.          The Log() function works like the printf function: you can use
  1145.          format specifiers in the <fmt> string, and pass extra parameters.
  1146.  
  1147.          Example:   Log(LOG_NORMAL,"User's name = %s",CurUser->name);
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.                                       - 20 -
  1157.  
  1158.  
  1159.  
  1160.          ------------------------------------------------------------------
  1161.          void HangUp();
  1162.          ------------------------------------------------------------------
  1163.  
  1164.          Hangs up the phone, logging off the user. It is exactly the same
  1165.          as pressing Alt-H.
  1166.  
  1167.  
  1168.  
  1169.          ------------------------------------------------------------------
  1170.          bool CheckAccess(int level,long flags);
  1171.          ------------------------------------------------------------------
  1172.  
  1173.          Checks if the current user can access something that requires
  1174.          <level> and <flags>. Returns TRUE if the user has access, FALSE if
  1175.          not.
  1176.  
  1177.  
  1178.  
  1179.          ------------------------------------------------------------------
  1180.          KEY ScanKey(void);
  1181.          ------------------------------------------------------------------
  1182.  
  1183.          Checks the LOCAL keyboard for a key, and returns the scan code for
  1184.          that key. If no key is available, 0 will be returned.
  1185.  
  1186.          For a list of defined values for scan codes, check the file
  1187.          PB_SDK.H.
  1188.  
  1189.  
  1190.  
  1191.          ------------------------------------------------------------------
  1192.          bool GetFlag(long flags,char flagchar);
  1193.          void SetFlag(long flags,char flagchar);
  1194.          void ClearFlag(long flags,char flagchar);
  1195.          ------------------------------------------------------------------
  1196.  
  1197.          Access flags are stored in a long integer (32 bits). You have 3
  1198.          macros at your disposal to manipulate access flags:
  1199.  
  1200.             GetFlag   : Returns TRUE if flag <flagchar> is set
  1201.             SetFlag   : Turns flag <flagchar> on
  1202.             ClearFlag : Turns flag <flagchar> off
  1203.  
  1204.          <flagchar> must be a value from 1 to 32. 1-26 correspond to A-Z,
  1205.                     while 27-32 are the same as 1-6.
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.                                       - 21 -
  1213.  
  1214.  
  1215.  
  1216.          ------------------------------------------------------------------
  1217.          int ErrorLevel(void);
  1218.          ------------------------------------------------------------------
  1219.  
  1220.          Returns the errorlevel of the last executed shell command (Through
  1221.          MenuFunction(MENU_SHELL,...))
  1222.  
  1223.  
  1224.  
  1225.          ------------------------------------------------------------------
  1226.          bool GetIniVar(char *fname,char *varname,char *value,int max);
  1227.          bool SetIniVar(char *fname,char *varname,char *value);
  1228.          ------------------------------------------------------------------
  1229.  
  1230.          These functions can be used to read and write to .INI files. These
  1231.          files are similar to the files used by MS Windows. They can be
  1232.          used to store settings for your application (PEX). An example
  1233.          of a .INI file:
  1234.  
  1235.                DataPath = C:\PB\PEX\MYPEX\DATA
  1236.                ProgPath = C:\PB\PEX\MYPEX
  1237.                MaxUsers = 10
  1238.  
  1239.          This is a standard ASCII file, with each line in the form
  1240.             <varname> = <value>
  1241.  
  1242.          The value of a specific variable can be read by calling the
  1243.          function GetIniVar(). Setting a variable (writing to the .INI file
  1244.          or createing it if it doesn't exist yet) can be done by calling
  1245.          SetIniVar().
  1246.  
  1247.          The parameters for the functions are:
  1248.  
  1249.              <fname>      Name of the .INI file. The extension of the file
  1250.                           will always be changed to .INI by ProBoard.
  1251.              <varname>    Name of the variable (case INsensitive)
  1252.              <value>      For GetIniVar() : a pointer to a buffer where the
  1253.                                             variable's contents will be
  1254.                                             stored.
  1255.                           For SetIniVar() : a pointer to the value of the
  1256.                                             variable.
  1257.              <max>        Maximum number of characters that can be copied
  1258.                           in <value> (including trailing '\0')
  1259.  
  1260.  
  1261.          Return value: FALSE if the file could not be opened or the
  1262.                        variable does not exist.
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.                                       - 22 -
  1269.  
  1270.  
  1271.  
  1272.          ------------------------------------------------------------------
  1273.          void exit(void);
  1274.          ------------------------------------------------------------------
  1275.  
  1276.          Exits the current pex-program, and unloads it from memory.
  1277.  
  1278.  
  1279.  
  1280.          ------------------------------------------------------------------
  1281.          void ExitTSR(void);
  1282.          ------------------------------------------------------------------
  1283.  
  1284.          Exits the current pex-program, and leaves it resident. This has
  1285.          some important implications:
  1286.  
  1287.           - All global and static variables keep their values for
  1288.             subsequent executions.
  1289.           - When the same pex-file is run again through menu function 60,
  1290.             the resident copy will be executed. This will result in faster
  1291.             loading.
  1292.  
  1293.          If you set up any handlers, you MUST use ExitTSR() to exit the
  1294.          program.
  1295.  
  1296.  
  1297.  
  1298.          ------------------------------------------------------------------
  1299.          int InstallHandler(int handler,function);
  1300.          ------------------------------------------------------------------
  1301.  
  1302.          This is probably the most advanced and complicated function in the
  1303.          ProBoard SDK. With this function you can set up a "handler" for a
  1304.          specific action. Right now, only two types of handlers are
  1305.          supported: a replacement for the sysopkey-handler and a handler
  1306.          to intercept loss of carrier. This way you can create your own
  1307.          sysopkeys, or change the behaviour of existing sysopkeys. You could
  1308.          create a handler that intercepts the Alt-J key, and write your own
  1309.          flavor. In future versions you will be able to set up handlers for
  1310.          low-level I/O operations. So you could replace all I/O routines by
  1311.          your own functions. This way you can support your own exotic
  1312.          hardware or something like that. Anything goes!
  1313.  
  1314.             handler   : Handler type. At this time, only HANDLER_SYSOPKEY
  1315.                         and HANDLER_HANGUP are supported.
  1316.             function  : A pointer to the handler function you created.
  1317.  
  1318.          Return value : -1 if illegal handler number is specified
  1319.                          0 if ok
  1320.  
  1321.  
  1322.  
  1323.  
  1324.                                       - 23 -
  1325.  
  1326.  
  1327.  
  1328.          The handler function is a function that returns an integer. The
  1329.          parameters depend on the type of handler you are creating.
  1330.  
  1331.          For HANDLER_SYSOPKEY the handler function has to be declared like
  1332.          this:
  1333.  
  1334.          int sysopkeyhandler(KEY k)
  1335.          {
  1336.          ...
  1337.          }
  1338.  
  1339.          A sysopkey handler intercepts any special key that is pressed by the
  1340.          sysop. (like F1,Alt-H,...). You can redefine any key, or add your
  1341.          own.
  1342.  
  1343.  
  1344.  
  1345.          For HANDLER_HANGUP, the handler functions has to be declared like
  1346.          this:
  1347.  
  1348.          int hanguphandler(void)
  1349.          {
  1350.          ...
  1351.          }
  1352.  
  1353.          The hangup handler works a little different: it is called whenever
  1354.          ProBoard exits (carrier lost, sysop hung up,...). It can be used to
  1355.          perform some cleanup for your running PEX file (like closing 
  1356.          files, writing data, etc..). You can install the handler at the 
  1357.          start of your program  and remove it before the program is 
  1358.          finished.
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.                                       - 24 -
  1381.  
  1382.  
  1383.  
  1384.          If a handler function decides to do anything, it has to return
  1385.          HANDLED. If the handler wants to leave it up to ProBoard, it must
  1386.          return NOT_HANDLED.
  1387.  
  1388.          This asks for an example I suppose:
  1389.  
  1390.          int keyhandler(KEY k)
  1391.          {
  1392.           if(k == KEY_ALTJ)
  1393.             {
  1394.              printf("\7\rHang on %s! I'm shelling to DOS...",UserFirstName);
  1395.              MenuFunction(MENU_SHELL,"*N*Q*X*!");
  1396.              printf("I'm back!!\n");
  1397.  
  1398.              return HANDLED;
  1399.             }
  1400.            else return NOT_HANDLED;
  1401.          }
  1402.  
  1403.          main(int argc,char *argv[])
  1404.          {
  1405.           InstallHandler(HANDLER_SYSOPKEY,keyhandler);
  1406.  
  1407.           ExitTSR();    /* IMPORTANT */
  1408.          }
  1409.  
  1410.          So what does it do?  It intercepts the sysopkey-function, and
  1411.          checks if the key pressed is Alt-J. If it is, it shells to DOS
  1412.          with swapping ON, and it writes its own messages to the screen.
  1413.          When the sysop returns, the handler returns HANDLED to let
  1414.          ProBoard know that it does not have to process the key. You could
  1415.          use this example in an INIT.PEX file.
  1416.          Is this powerful or what?
  1417.  
  1418.  
  1419.  
  1420.          ------------------------------------------------------------------
  1421.          void RemoveHandler(int handler);
  1422.          ------------------------------------------------------------------
  1423.  
  1424.          Removes handler number <handler> which has been installed by
  1425.          InstallHandler().
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.                                       - 25 -
  1437.  
  1438.  
  1439.  
  1440.         ┌──────────────────────────────────────────────────────────────────┐
  1441.         │ Global ProBoard Variables                                        │
  1442.         └──────────────────────────────────────────────────────────────────┘
  1443.  
  1444.          You have access to some important ProBoard system variables
  1445.          through global variables defined in PB_SDK.H.
  1446.  
  1447.  
  1448.          ------------------------------------------------------------------
  1449.          USER_REC * CurUser;
  1450.          ------------------------------------------------------------------
  1451.  
  1452.          Pointer to the current user record. You can change any of the
  1453.          field values in the record, but this will not result in any
  1454.          immediate action by ProBoard. For example, if you change the
  1455.          user's level, ProBoard will not know that you changed it, so you
  1456.          will have to tell it by calling AdjustTime();
  1457.  
  1458.          Check the file PB_SDK.H for a description of the USER_REC
  1459.          structure.
  1460.  
  1461.  
  1462.  
  1463.          ------------------------------------------------------------------
  1464.          int UserRecNr;
  1465.          ------------------------------------------------------------------
  1466.  
  1467.          The record number of the current user's record in the file
  1468.          USERS.BBS. This value cannot be changed.
  1469.  
  1470.  
  1471.  
  1472.          ------------------------------------------------------------------
  1473.          int NumLimits;
  1474.          ------------------------------------------------------------------
  1475.  
  1476.          The number of user levels defined in ProCFG. You can access the
  1477.          limit-values through the global array 'Limits'.  This value
  1478.          cannot be changed.
  1479.  
  1480.  
  1481.  
  1482.          ------------------------------------------------------------------
  1483.          LIMIT * Limits;
  1484.          ------------------------------------------------------------------
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.                                       - 26 -
  1493.  
  1494.  
  1495.  
  1496.          Is an array of all user levels defined, with download and time
  1497.          limits. Check the file PB_SDK.H for information on the LIMIT
  1498.          structure.
  1499.          You are not allowed to change any values! (A good compiler should
  1500.          generate an error or warning if you try to do so)
  1501.  
  1502.  
  1503.  
  1504.          ------------------------------------------------------------------
  1505.          char * LoginDate;
  1506.          char * LoginTime;
  1507.          ------------------------------------------------------------------
  1508.  
  1509.          This is the login date & time of the current user.
  1510.  
  1511.            LoginDate[0] : Day portion of login date
  1512.            LoginDate[1] : Month portion of login date
  1513.            LoginDate[2] : Year portion of login date (00-99)
  1514.            LoginTime[0] : Hour portion of login time
  1515.            LoginTime[1] : Minute portion of login time
  1516.            LoginTime[2] : Second portion of login time
  1517.  
  1518.  
  1519.  
  1520.          ------------------------------------------------------------------
  1521.          bool NetEntered;
  1522.          bool EchoEntered;
  1523.          ------------------------------------------------------------------
  1524.  
  1525.          These READ-ONLY variables tell you if netmail or echomail has been
  1526.          entered during this session.
  1527.  
  1528.  
  1529.  
  1530.          ------------------------------------------------------------------
  1531.          int NumUsers;
  1532.          ------------------------------------------------------------------
  1533.  
  1534.          This READ-ONLY variable is the number of users currently available
  1535.          in the file USERS.BBS.
  1536.  
  1537.  
  1538.  
  1539.          ------------------------------------------------------------------
  1540.          int NodeNumber;
  1541.          ------------------------------------------------------------------
  1542.  
  1543.          This READ-ONLY variable is the current node number.
  1544.  
  1545.  
  1546.  
  1547.  
  1548.                                       - 27 -
  1549.  
  1550.  
  1551.  
  1552.          ------------------------------------------------------------------
  1553.          char * CurMenu;
  1554.          char * UserFirstname;
  1555.          char * PrevUser;
  1556.          char * StartupPath;
  1557.          char * SysPath;
  1558.          ------------------------------------------------------------------
  1559.  
  1560.          CurMenu       : Current menu name
  1561.          UserFirstName : First name of current user
  1562.          PrevUser      : Name of previous user
  1563.          StartupPath   : Name of the directory where ProBoard was started
  1564.                          from (with trailing '\')
  1565.          SysPath       : Name of the ProBoard system directory (with
  1566.                          trailing '\')
  1567.  
  1568.          These are READ-ONLY strings!
  1569.  
  1570.  
  1571.  
  1572.          ------------------------------------------------------------------
  1573.          CONFIG * Config;
  1574.          ------------------------------------------------------------------
  1575.  
  1576.          A pointer to the current ProBoard configuration structure. See the
  1577.          file PB_SDK.H for a description of the CONFIG structure.
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.                                       - 28 -
  1605.  
  1606.  
  1607.  
  1608.         ┌──────────────────────────────────────────────────────────────────┐
  1609.         │ Special-purpose PEX-files                                        │
  1610.         └──────────────────────────────────────────────────────────────────┘
  1611.  
  1612.          Several pex-files will be loaded automatically (if present). They
  1613.          perform certain actions like edit a message, set up handlers, etc.
  1614.  
  1615.                INIT.PEX      : Will be loaded and executed before any I/O
  1616.                                has been done.  Use this to set up any
  1617.                                handlers (sysopkey handlers, ...)
  1618.  
  1619.                INIT_1.PEX -
  1620.                INIT_9.PEX    : Is the same as INIT.PEX, but will be loaded
  1621.                                in the order of the numbers. So you can have
  1622.                                up to 10 initialization pex-files.
  1623.  
  1624.                LOGIN.PEX     : Is run just before the user is asked for
  1625.                                his/her name.
  1626.  
  1627.                BIRTHDAY.PEX  : Is run after showing NEWS.ANS/ASC if today
  1628.                                is the user's birthday.
  1629.  
  1630.                NEWUSER1.PEX  : Is run before the file NEWUSER1.ANS/ASC is
  1631.                                shown.
  1632.  
  1633.                NEWUSER2.PEX  : Is run before the file NEWUSER2.ANS/ASC is
  1634.                                shown.
  1635.  
  1636.                WELCOME.PEX   : Is run before the file WELCOME.ANS/ASC is
  1637.                                shown
  1638.  
  1639.                WELCOMEx.PEX  : Is run before the file WELCOMEx.ANS/ASC is
  1640.                                shown (x = 1 to 9)
  1641.  
  1642.                SECxx.PEX     : Executed when a user with security level xx
  1643.                                logs in. Is run before SECxx.ANS/ASC is
  1644.                                shown.
  1645.  
  1646.                EXPIRED.PEX   : Is run before EXPIRED.ANS/ASC is shown, and
  1647.                                after a user's level is lowered because the
  1648.                                subscription date was reached.
  1649.  
  1650.                GOODBYE.PEX   : Is run before GOODBYE.ANS is displayed.
  1651.  
  1652.                GOODBYE2.PEX  : Is run after GOODBYE.ANS is displayed.
  1653.  
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.  
  1660.                                       - 29 -
  1661.  
  1662.  
  1663.  
  1664.                MSGED.PEX     : Is a replacement of the built-in message
  1665.                                editor. It will be executed with no
  1666.                                parameters. The message that you create has
  1667.                                to be written to a file called MSGTMP.
  1668.                                ProBoard will then read this file and create
  1669.                                a message from it. To let ProBoard know that
  1670.                                the user has aborted a message, delete
  1671.                                MSGTMP.
  1672.  
  1673.                FSED.PEX      : Is similar to MSGED.PEX, but will be
  1674.                                executed if the user has selected the
  1675.                                fullsrceen editor. It works the same way as
  1676.                                MSGED.PEX, but ProBoard will create a MSGTMP
  1677.                                file with the original message if a user is
  1678.                                replying to a message.
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.                                       - 30 -
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.                                       - 31 -
  1774.